package serve

import (
	"aquaman/app/biz/lottery"
	"aquaman/app/biz/train"
	infragrpc "aquaman/app/infra/grpc"
	"github.com/spf13/viper"
	"google.golang.org/grpc"
)

// 所有 gRPC Service 统一在此注册
func gRPCRegisterServiceFn(
	v *viper.Viper,
	lotteryRPC *lottery.GrpcBinding,
	trainRPC *train.GrpcBinding,
	) infragrpc.RegisterServiceFunc {
	return func(s *grpc.Server) *grpc.Server {
		lottery.RegisterLotteryServer(s,lotteryRPC)
		train.RegisterTrainServer(s, trainRPC)
		return s
	}
}
